
public class Liczba {
	private char[] hexValues = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
		
	public String decimalToOtherNumericSystem(int number, int numberSystem){
		int remainder = 0;
		int naturalQuotient = number;
		String result = "";
		
		while(naturalQuotient > 0){
			remainder = naturalQuotient % numberSystem;
			naturalQuotient = naturalQuotient / numberSystem;
			result = this.hexValues[remainder] + result;
		}
		
		return result;
	}
}
